<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: SPRITE Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_s_p_r_i_t_e-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPRITE Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aefc379df23410812d5799c2b93161e19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#aefc379df23410812d5799c2b93161e19">setPos</a> (uint8_t <a class="el" href="struct_s_p_r_i_t_e.html#a44b2c947f1c6e30f31a77b8520855841">x</a>, uint8_t <a class="el" href="struct_s_p_r_i_t_e.html#ab0ea36dda66319248b66b1a5056b1ba9">y</a>)</td></tr>
<tr class="separator:aefc379df23410812d5799c2b93161e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3f35eab30dd39e4434b29923f0afab6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#af3f35eab30dd39e4434b29923f0afab6">draw</a> ()</td></tr>
<tr class="separator:af3f35eab30dd39e4434b29923f0afab6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada52ad2a7aae3bdb62c6dc66ccb8765c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#ada52ad2a7aae3bdb62c6dc66ccb8765c">eraseTrace</a> ()</td></tr>
<tr class="separator:ada52ad2a7aae3bdb62c6dc66ccb8765c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab08b9b2831224d69a19d992819d100a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#ab08b9b2831224d69a19d992819d100a2">erase</a> ()</td></tr>
<tr class="separator:ab08b9b2831224d69a19d992819d100a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20017763966ef3adcf3bb7015e39eb14"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a20017763966ef3adcf3bb7015e39eb14">isNearMove</a> () const</td></tr>
<tr class="separator:a20017763966ef3adcf3bb7015e39eb14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e207e844a61cf781260fef142bc6aa0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a9e207e844a61cf781260fef142bc6aa0">getRect</a> () const</td></tr>
<tr class="separator:a9e207e844a61cf781260fef142bc6aa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ee73688f564cc3a894ed9516e30c448"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a6ee73688f564cc3a894ed9516e30c448">getLRect</a> () const</td></tr>
<tr class="separator:a6ee73688f564cc3a894ed9516e30c448"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e3987f9f24d964797a7b0e28a231366"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a7e3987f9f24d964797a7b0e28a231366">getUpdateRect</a> () const</td></tr>
<tr class="separator:a7e3987f9f24d964797a7b0e28a231366"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a44b2c947f1c6e30f31a77b8520855841"><td class="memItemLeft" align="right" valign="top"><a id="a44b2c947f1c6e30f31a77b8520855841"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a44b2c947f1c6e30f31a77b8520855841">x</a></td></tr>
<tr class="memdesc:a44b2c947f1c6e30f31a77b8520855841"><td class="mdescLeft">&#160;</td><td class="mdescRight">draw position X on the screen <br /></td></tr>
<tr class="separator:a44b2c947f1c6e30f31a77b8520855841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0ea36dda66319248b66b1a5056b1ba9"><td class="memItemLeft" align="right" valign="top"><a id="ab0ea36dda66319248b66b1a5056b1ba9"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#ab0ea36dda66319248b66b1a5056b1ba9">y</a></td></tr>
<tr class="memdesc:ab0ea36dda66319248b66b1a5056b1ba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">draw position Y on the screen <br /></td></tr>
<tr class="separator:ab0ea36dda66319248b66b1a5056b1ba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb6cdf1e159d5d3a8655d1944d4be2de"><td class="memItemLeft" align="right" valign="top"><a id="abb6cdf1e159d5d3a8655d1944d4be2de"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#abb6cdf1e159d5d3a8655d1944d4be2de">w</a></td></tr>
<tr class="memdesc:abb6cdf1e159d5d3a8655d1944d4be2de"><td class="mdescLeft">&#160;</td><td class="mdescRight">sprite width <br /></td></tr>
<tr class="separator:abb6cdf1e159d5d3a8655d1944d4be2de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc5ed686d6064db045512fc72bc02dd3"><td class="memItemLeft" align="right" valign="top"><a id="afc5ed686d6064db045512fc72bc02dd3"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#afc5ed686d6064db045512fc72bc02dd3">lx</a></td></tr>
<tr class="memdesc:afc5ed686d6064db045512fc72bc02dd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">last draw position X on the screen <br /></td></tr>
<tr class="separator:afc5ed686d6064db045512fc72bc02dd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab3453c2a4cf02976c6d53fa79e5e051"><td class="memItemLeft" align="right" valign="top"><a id="aab3453c2a4cf02976c6d53fa79e5e051"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#aab3453c2a4cf02976c6d53fa79e5e051">ly</a></td></tr>
<tr class="memdesc:aab3453c2a4cf02976c6d53fa79e5e051"><td class="mdescLeft">&#160;</td><td class="mdescRight">last draw position Y on the screen <br /></td></tr>
<tr class="separator:aab3453c2a4cf02976c6d53fa79e5e051"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac56b0c16d0bcd810ae1289350df821c3"><td class="memItemLeft" align="right" valign="top"><a id="ac56b0c16d0bcd810ae1289350df821c3"></a>
const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#ac56b0c16d0bcd810ae1289350df821c3">data</a></td></tr>
<tr class="memdesc:ac56b0c16d0bcd810ae1289350df821c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to PROGMEM data, representing sprite image. <br /></td></tr>
<tr class="separator:ac56b0c16d0bcd810ae1289350df821c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a179f75785cfe41d2aaba303536d09d26"><td class="memItemLeft" align="right" valign="top"><a id="a179f75785cfe41d2aaba303536d09d26"></a>
const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_r_i_t_e.html#a179f75785cfe41d2aaba303536d09d26">transparentMask</a></td></tr>
<tr class="memdesc:a179f75785cfe41d2aaba303536d09d26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to PROGMEM data, representing sprite transparencyMask (can be nullptr) <br /></td></tr>
<tr class="separator:a179f75785cfe41d2aaba303536d09d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="struct_s_p_r_i_t_e.html">SPRITE</a> structure represents logical graphics object </p><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000021">Deprecated:</a></b></dt><dd>Use <a class="el" href="class_nano_sprite.html">NanoSprite</a> or <a class="el" href="class_nano_fixed_sprite.html">NanoFixedSprite</a> instead. </dd></dl>

<p class="definition">Definition at line <a class="el" href="nano__gfx__types_8h_source.html#l00146">146</a> of file <a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="af3f35eab30dd39e4434b29923f0afab6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3f35eab30dd39e4434b29923f0afab6">&#9670;&nbsp;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPRITE::draw </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Draws sprite on the display. Position can be changed by updating x and y fields of <a class="el" href="struct_s_p_r_i_t_e.html">SPRITE</a> structure. </p>

</div>
</div>
<a id="ab08b9b2831224d69a19d992819d100a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab08b9b2831224d69a19d992819d100a2">&#9670;&nbsp;</a></span>erase()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPRITE::erase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears sprite from the display leaving black rectangle. </p>

</div>
</div>
<a id="ada52ad2a7aae3bdb62c6dc66ccb8765c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada52ad2a7aae3bdb62c6dc66ccb8765c">&#9670;&nbsp;</a></span>eraseTrace()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPRITE::eraseTrace </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears some sprite parts in old position on the display. </p>

</div>
</div>
<a id="a6ee73688f564cc3a894ed9516e30c448"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ee73688f564cc3a894ed9516e30c448">&#9670;&nbsp;</a></span>getLRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a> SPRITE::getLRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns area in 8-pixel blocks, which was used by the sprite last time For example, if sprite pixels coordinates are 10,18 and size is 8x8, the rect will be (left:1,top:2,right:2,bottom:3). if sprite pixels coordinates are 32,16 and size is 8x8, the rect will be (left:4,top:2,right:4,bottom:2). </p>

<p class="definition">Definition at line <a class="el" href="nano__gfx__types_8h_source.html#l00222">222</a> of file <a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>.</p>

</div>
</div>
<a id="a9e207e844a61cf781260fef142bc6aa0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e207e844a61cf781260fef142bc6aa0">&#9670;&nbsp;</a></span>getRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a> SPRITE::getRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns area in 8-pixel blocks, which is used by the sprite.</p>
<p>For example, if sprite pixels coordinates are 10,18 and size is 8x8, the rect will be (left:1,top:2,right:2,bottom:3). if sprite pixels coordinates are 32,16 and size is 8x8, the rect will be (left:4,top:2,right:4,bottom:2). </p>

<p class="definition">Definition at line <a class="el" href="nano__gfx__types_8h_source.html#l00206">206</a> of file <a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>.</p>

</div>
</div>
<a id="a7e3987f9f24d964797a7b0e28a231366"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e3987f9f24d964797a7b0e28a231366">&#9670;&nbsp;</a></span>getUpdateRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_s_s_d1306___r_e_c_t.html">SSD1306_RECT</a> SPRITE::getUpdateRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns area in 8-pixel blocks, which includes old and new position For example, if sprite pixels coordinates are 12,18 and size is 8x8, and sprite is moved to the right by 6 pixels, the rect will be (left:1,top:2,right:3,bottom:3). </p>

<p class="definition">Definition at line <a class="el" href="nano__gfx__types_8h_source.html#l00239">239</a> of file <a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>.</p>

</div>
</div>
<a id="a20017763966ef3adcf3bb7015e39eb14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20017763966ef3adcf3bb7015e39eb14">&#9670;&nbsp;</a></span>isNearMove()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool SPRITE::isNearMove </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns true if sprite is moved not far from previous position, and old and new rects have intersection. </p>

<p class="definition">Definition at line <a class="el" href="nano__gfx__types_8h_source.html#l00191">191</a> of file <a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a>.</p>

</div>
</div>
<a id="aefc379df23410812d5799c2b93161e19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aefc379df23410812d5799c2b93161e19">&#9670;&nbsp;</a></span>setPos()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPRITE::setPos </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Updates active position of the sprite (doesn't redraw it) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>- horizontal position </td></tr>
    <tr><td class="paramname">y</td><td>- vertical position </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="nano__gfx__types_8h_source.html">nano_gfx_types.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
